package com.cskaoyan.day03.stack;

/**
 * @author stone
 * @date 2022/01/29 14:59
 */
public class ArrayStackDemo {

    public static void main(String[] args) {
        ArrayStack<String> stack = new ArrayStack<>(3);
        stack.push("红");//push应该做的事情是啥 → 应该想数组里放入数据 → 放入数据之前完成数组的初始化
        stack.push("橙");
        stack.push("黄");
        stack.push("绿");

        System.out.println(stack.pop());
        System.out.println(stack.pop());
        System.out.println(stack.pop());
        System.out.println(stack.pop());
        //System.out.println(stack.pop());


    }
}
